using System;
using System.Data;
using System.Collections;
using APP.QUANLY.Common;

namespace RMAS.DAL
{
    /// <summary>
    /// Summary description for DM_ITEMOBJECT.
    /// </summary>
    public class DM_ITEMOBJECT
    {
              private string _ItemObject;
      private string _ItemObjectName;
      private QT_ITEMINOUTList _listQT_ITEMINOUT;
        private bool isExisting;
        #region Properties
        public bool IsExisting
        {
              get{return isExisting;}
              set{isExisting = value;}
        }
	      public bool IsSetItemObject; 
      public bool IsItemObjectNullable   
      { 
	 get { return false;  } 
      }
      public string ItemObject
      {
         get { return _ItemObject; }
         set 
	    { 
 		 _ItemObject = value;
		IsSetItemObject = true;
 	    }
      }
    public bool IsSetItemObjectName; 
    public bool IsItemObjectNameNullable   
    { 
		get { return false;  } 
    }
    public string ItemObjectName
    {
        get{ return _ItemObjectName;  }
        set
		{
			_ItemObjectName = value;
			IsSetItemObjectName = true;
		}
    }
public QT_ITEMINOUTList QT_ITEMINOUTList 
{ 
	get { return _listQT_ITEMINOUT; }
	set { _listQT_ITEMINOUT = value;}
}

        #endregion

        #region Constructors
        public DM_ITEMOBJECT()
        {
            Reset();
        }
        public DM_ITEMOBJECT(DM_ITEMOBJECT obj)
        {
            	this._ItemObject = obj.ItemObject;
	this._ItemObjectName = obj.ItemObjectName;
        }
        #endregion

        public void Reset()
        {
                     _ItemObject = EmptyValues.v_string;
         _ItemObjectName = EmptyValues.v_string;
	_listQT_ITEMINOUT = null;
        }

         
        #region Hidden

        /*
        private void readProperties(IDataReader reader)
        {
            try
            {
                                if(!(reader["ItemObject"] is DBNull))
		{
			obj.ItemObject = (string)reader["ItemObject"];
		}
                if(!(reader["ItemObjectName"] is DBNull))
		{
			obj.ItemObjectName = (string)reader["ItemObjectName"];
		}
//            _ItemObject = (reader["ItemObject"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["ItemObject"];
//            _ItemObjectName = (reader["ItemObjectName"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["ItemObjectName"];
            }
            catch (Exception ex)
            {
                throw new DalException("Failed to read properties from DataReader.", ex);
            }
        } 
        */

        #endregion


        public void Fill(string ItemObject, string ItemObjectName)
        {
                     this._ItemObject = ItemObject;
         this._ItemObjectName = ItemObjectName;
        }
    }
}